<template>
  <div>
    <el-button @click="change">{{ count }}</el-button>
  </div>
</template>

<script setup lang="ts">
import { useCounterStore } from "@/stores/counterStore.ts";
import pinia from "@/stores/index";
import { storeToRefs } from "pinia";
const demo = useCounterStore();
const { count } = storeToRefs(useCounterStore(pinia));
const change = () => {
  demo.increment();
  console.log(count.value);
};
</script>

<style lang="sass" scoped></style>
